package com.kasax.android.arch.thread;

import android.os.Handler;
import android.os.Looper;

import java.util.concurrent.Executor;

public class MainThreadExecutor implements Executor {
    // 主线程
    private Handler handler = new Handler(Looper.getMainLooper());


    @Override
    public void execute(Runnable command) {
        // 在主线程中执行
        handler.post(command);
    }
}